<%= form_tag :action => 'update' %>

  <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
	  <tbody><tr><td class="rightmainbody"><table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">

    <tbody>
    <tr class="tdbheader">
      <td nowrap="nowrap" width="10%">排序</td>
      <td width="35%">名称</td>
      <td width="35%">文章数</td>
      <td nowrap="nowrap" width="20%">操作</td>
    </tr>

   <% for category in @categories %>
    <tr class="tablecell">
      <td nowrap="nowrap">
      <input class="formfield" style="text-align: center; font-size: 11px;" value=<%=category.position.to_i%> name="displayorder[2]" size="1" type="text"></td>
      <td><b><%=category.title%></b></td>
      <td><%=category.topics_count%></td>
      <td nowrap="nowrap">
      <%= link_to '编辑', :action => 'edit', :id => category %>
      - <%= link_to '删除', { :action => 'destroy', :id => category }, :confirm => 'Are you sure?', :method => :post %>
      </a>
      </td>
    </tr>
    <% end %>


    <tr class="tablecell">
      <td colspan="4" align="center">
        <input name="action" value="updatedisplayorder" type="hidden">
        <input value="更新排序" class="formbutton" type="submit">
      </td>
    </tr>

    <tr>
      <td class="tablebottom" colspan="4"></td>
    </tr>
      </tbody></table></td>
    </tr>
  </tbody></table>
</form>

